<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>computed</title>
</head>

<body>
    <script type="module">
        import { reactive, computed } from './reactivity/index.js'
        const production = {
            price: 100,
            count: 5
        }

        const reactiveProduction = reactive(production)

        let totalPrice = computed(() => {
            return reactiveProduction.price * reactiveProduction.count
        })

        console.log(totalPrice.value)

        reactiveProduction.price = 200

        console.log(totalPrice.value)

        reactiveProduction.count = 10

        console.log(totalPrice.value)
    </script>
</body>

</html>